package com.huidu.bitrade.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huidu.bitrade.dto.MemberAllParentDto;
import com.huidu.bitrade.dto.MemberParentUserDTO;
import com.huidu.bitrade.entity.Member;
import com.huidu.bitrade.entity.MemberHdc;
import com.huidu.bitrade.mapper.MemberMapper;
import com.huidu.bitrade.service.NewMemberService;
import com.huidu.bitrade.vo.ExportVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class NewMemberServiceImpl extends ServiceImpl<MemberMapper, Member> implements NewMemberService {

    @Autowired
    private MemberMapper memberMapper;

    @Override
    public List<MemberParentUserDTO> findUserAndParent() {
        return baseMapper.findUserAndParent();
    }

    @Override
    public MemberParentUserDTO findUserAndParentById(Long id) {
        return baseMapper.findUserAndParentById(id);
    }


    /**
     * 查询用户和所有推荐人
     * @param ids
     * @return
     */
    @Override
    public List<MemberAllParentDto> findAllParentById(List<Long> ids){
        return baseMapper.findAllParentById(ids);
    }

    @Override
    public int updateMemberStar(Long memberId,Integer memberStar,Integer memberStarCount){
        return memberMapper.updateMemberStar(memberId,memberStar,memberStarCount);
    }

    @Override
    public List<Long> getUpdateHdcMember(){
        return memberMapper.getUpdateHdcMember();
    }


}
